Image processing device and image processing method

ABSTRACT

Provided is an image processing device including a selection section configured to select, from a plurality of transform units with different sizes, a transform unit used for inverse orthogonal transformation of image data to be decoded, a generation section configured to generate, from a first quantization matrix corresponding to a transform unit for a first size, a second quantization matrix corresponding to a transform unit for a second size from a first quantization matrix corresponding to a transform unit for a first size, and an inverse quantization section configured to inversely quantize transform coefficient data for the image data using the second quantization matrix generated by the generation section when the selection section selects the transform unit for the second size.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. Ser. No. 13/881,927 filedApr. 26, 2013, the entire content of which is incorporated herein byreference, which is the national stage of PCT/JP11/073657 filed Oct. 14,2011, and claims the benefit of priority under 35 U.S.C. 119 to JapaneseApplication Nos. 2010-275116 filed Dec. 9, 2010 and 2011-049992 filedMar. 8, 2011.

TECHNICAL FIELD

The present disclosure relates to an image processing device and animage processing method.

BACKGROUND ART

H.264/AVC, one of standard specifications for image encoding schemes,can use different quantization steps for orthogonal transformcoefficient components to quantize image data in a profile equal to HighProfile or higher. A quantization step for each orthogonal transformcoefficient component can be configured based on a quantization matrix(also referred to as a scaling list) and a reference step value. Thequantization matrix is defined as a size substantially the same as anorthogonal transform unit.

FIG. 19 illustrates preset values (default values) for four types ofquantization matrices predefined in H.264/AVC. For example, matrix SL01is a default for the quantization matrix if the transform unit size is4×4 in intra prediction mode. Matrix SL02 is a default for thequantization matrix if the transform unit size is 4×4 in interprediction mode. Matrix SL03 is a default for the quantization matrix ifthe transform unit size is 8×8 in intra prediction mode. Matrix SL04 isa default for the quantization matrix if the transform unit size is 8×8in inter prediction mode. A user can use a sequence parameter set or apicture parameter set to specify a specific quantization matrixdifferent from the default values shown in FIG. 19. If the quantizationmatrix is not used, an equal value is used for all components of thequantization step used for the quantization.

High Efficiency Video Coding (HEVC) is a next-generation image encodingscheme as a successor to H.264/AVC and its standardization is promoted.HEVC incorporates the concept of coding unit (CU) which corresponds to aconventional macro block (see Non-Patent Literature 1 below). Thesequence parameter set specifies a range of coding unit sizes using aset of power-of-two values which are a largest coding unit (LCU) and asmallest coding unit (SCU). The use of split_flag specifies a specificcoding unit size within the range specified by LCU and SCU.

According to HEVC, one coding unit can be divided into one or moreorthogonal transformation units, namely one or more transform units(TUs). The transform unit size can be set to any of 4×4, 8×8, 16×16, and32×32. Accordingly, a quantization matrix can be specified according toeach of these transform unit size candidates.

H.264/AVC allows for designating only one quantization matrix for onetransform unit size within one picture as specified in the releasedreference software (http://iphome.hhi.de/suchring/tml/index.htm)referred to as a joint model (JM). By contrast, Non-Patent Literature 2shown below proposes to designate multiple quantization matrixcandidates for one transform unit size within one picture and adaptivelyselect a quantization matrix for each block from the viewpoint ofrate-distortion (RD) optimization.

CITATION LIST Non-Patent Literature

-   Non-Patent Literature 1: JCTVC-B205, “Test Model under    Consideration”, Joint Collaborative Team on Video Coding (JCT-VC) of    ITU-T SG16 WP3 and ISO/IEC JTC1/SC29/WG11 2nd Meeting: Geneva, CH,    21-28 Jul. 2010-   Non-Patent Literature 2: VCEG-AD06, “Adaptive Quantization Matrix    Selection on KTA Software”, ITU—Telecommunications Standardization    Sector STUDY GROUP 16 Question 6 Video Coding Experts Group (VCEG)    30th Meeting: Hangzhou, China, 23-24 Oct. 2006

SUMMARY OF INVENTION Technical Problem

However, increasing selectable transform unit size types also increasesthe number of available quantization matrices. Increasing amount ofcodes of quantization matrices may degrade coding efficiency. The codingefficiency may degrade more remarkably if the number of quantizationmatrices which can be designated for each transform unit size changesfrom one to more.

The technology according to the present disclosure aims at providing animage processing device and an image processing method capable ofsuppressing an increase in amount of codes due to an increase in thenumber of quantization matrices.

Solution to Problem

According to an embodiment of the present disclosure, there is providedan image processing device including a selection section configured toselect, from a plurality of transform units with different sizes, atransform unit used for inverse orthogonal transformation of image datato be decoded, a generation section configured to generate, from a firstquantization matrix corresponding to a transform unit for a first size,a second quantization matrix corresponding to a transform unit for asecond size, and an inverse quantization section configured to inverselyquantize transform coefficient data for the image data using the secondquantization matrix generated by the generation section when theselection section selects the transform unit for the second size.

The image processing device can be realized typically as an imagedecoding device for decoding an image.

Further, the generation section may generate the second quantizationmatrix using matrix information specifying the first quantization matrixand difference information representing a difference between a predictedmatrix having the second size predicted from the first quantizationmatrix and the second quantization matrix.

Further, the generation section may acquire the matrix information andthe difference information from a sequence parameter set or a pictureparameter set.

Further, the generation section may set the predicted matrix to be thesecond quantization matrix when one of a sequence parameter set and apicture parameter set provides a first flag indicating absence of adifference between the predicted matrix and the second quantizationmatrix.

Further, the first size may represent a minimum one of sizes for thetransform units.

Further, the second size may be larger than the first size. Thegeneration section may calculate the predicted matrix by duplicating oneof a first element and a second element as an element between the firstelement and the second element adjacent to each other in the firstquantization matrix.

Further, the second size may be larger than the first size. Thegeneration section may calculate the predicted matrix by linearlyinterpolating an element between a first element and a second elementadjacent to each other in the first quantization matrix.

Further, the second size may be double of the first size on one side.

Further, the second size may be smaller than the first size. Thegeneration section may calculate the predicted matrix by thinning anelement of the first quantization matrix.

Further, the second size may be smaller than the first size. Thegeneration section may calculate the predicted matrix by averaging aplurality of elements adjacent to each other in the first quantizationmatrix.

Further, the generation section may generate the second quantizationmatrix from the first quantization matrix when one of a sequenceparameter set and a picture parameter set provides a second flag tospecify use of a user-defined matrix as the second quantization matrix.

Further, according to another embodiment of the present disclosure,there is provided an image processing method including selecting, from aplurality of transform units with different sizes, a transform unit usedfor inverse orthogonal transformation of image data to be decoded,generating, from a first quantization matrix corresponding to atransform unit for a first size, a second quantization matrixcorresponding to a transform unit for a second size, and inverselyquantizing transform coefficient data for the image data using thesecond quantization matrix generated from the first quantization matrixwhen a transform unit for the second size is selected.

Further, according to another embodiment of the present disclosure,there is provided an image processing device including a selectionsection configured to select, from a plurality of transform units withdifferent sizes, a transform unit used for orthogonal transformation ofimage data to be encoded, a quantization section configured to quantizetransform coefficient data generated by orthogonally transforming theimage data based on a transform unit selected by the selection section,by using a quantization matrix corresponding to the selected transformunit, and an encoding section configured to encode information forgenerating a second quantization matrix corresponding to a transformunit for a second size from a first quantization matrix corresponding toa transform unit for a first size.

The image processing device can be realized typically as an imageencoding device for encoding an image.

Further, according to another embodiment of the present disclosure,there is provided an image processing method including selecting, from aplurality of transform units with different sizes, a transform unit usedfor orthogonal transformation of image data to be encoded, quantizingtransform coefficient data generated by orthogonally transforming theimage data based on a selected transform unit, by using a quantizationmatrix corresponding to the selected transform unit, and encodinginformation for generating a second quantization matrix corresponding toa transform unit for a second size from a first quantization matrixcorresponding to a transform unit for a first size.

Advantageous Effects of Invention

As described above, the image processing device and the image processingmethod according to the present disclosure can suppress in an increasein the code amount due to an increase in the number of quantizationmatrices.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram illustrating a hardware configuration of animage encoding device according to an embodiment.

FIG. 2 is a block diagram illustrating a detailed configuration of anorthogonal transformation and quantization section according to anembodiment.

FIG. 3 is a block diagram illustrating a more detailed configuration ofa matrix processing section according to an embodiment.

FIG. 4 is an explanatory diagram illustrating information inserted intoa sequence parameter set according to an embodiment.

FIG. 5 is an explanatory diagram illustrating information inserted intoa picture parameter set according to an embodiment.

FIG. 6A is the first half of a flowchart illustrating a first example ofencoding process flow according to an embodiment.

FIG. 6B is the latter half of a flowchart illustrating the first exampleof encoding process flow according to an embodiment.

FIG. 7A is the first half of a flowchart illustrating a second exampleof encoding process flow according to an embodiment.

FIG. 7B is the latter half of a flowchart illustrating the secondexample of encoding process flow according to an embodiment.

FIG. 8 is a block diagram illustrating a configuration of an imagedecoding device according to an embodiment.

FIG. 9 is a block diagram illustrating a detailed configuration of aninverse quantization and inverse orthogonal transformation sectionaccording to an embodiment.

FIG. 10 is a block diagram illustrating a more detailed configuration ofa matrix generation section according to an embodiment.

FIG. 11A is the first half of a flowchart illustrating a first exampleof decoding process flow according to an embodiment.

FIG. 11B is the latter half of a flowchart illustrating the firstexample of decoding process flow according to an embodiment.

FIG. 12A is the first half of a flowchart illustrating a second exampleof decoding process flow according to an embodiment.

FIG. 12B is the latter half of a flowchart illustrating the secondexample of decoding process flow according to an embodiment.

FIG. 13A is the first half of a flowchart illustrating an example ofencoding process flow according to one modification.

FIG. 13B is the latter half of a flowchart illustrating the example ofencoding process flow according to one modification.

FIG. 14A is the first half of a flowchart illustrating an example ofdecoding process flow according to one modification.

FIG. 14B is the first half of a flowchart illustrating the example ofdecoding process flow according to one modification.

FIG. 15 is a block diagram illustrating a schematic configuration of atelevision apparatus.

FIG. 16 is a block diagram illustrating a schematic configuration of amobile phone.

FIG. 17 is a block diagram illustrating a schematic configuration of arecording/reproduction device.

FIG. 18 is a block diagram illustrating a schematic configuration of animage capturing device.

FIG. 19 is an explanatory diagram illustrating quantization matrixdefault values predefined in H.264/AVC.

DESCRIPTION OF EMBODIMENT

Hereinafter, preferred embodiments of the present invention will bedescribed in detail with reference to the appended drawings. Note that,in this specification and the drawings, elements that have substantiallythe same function and structure are denoted with the same referencesigns, and repeated explanation is omitted.

Also, the detailed description of the embodiment(s) is described in afollowing order.

1. Configuration examples of the image encoding device according to anembodiment

1-1. Overall configuration example

1-2. Configuration example of the orthogonal transformation andquantization section

1-3. Detailed configuration example of the matrix processing section

1-4. Examples of information to be encoded

2. Encoding process flow according to an embodiment

3. Configuration examples of the image decoding device according to anembodiment

3-1. Overall configuration example

3-2. Configuration example of the inverse quantization and inverseorthogonal transformation section

3-3. Detailed configuration example of the matrix generation section

4. Decoding process flow according to an embodiment

5. Modifications

6. Example Applications

7. Summing-up

1. Configuration Examples of the Image Encoding Device According to anEmbodiment

The following describes configuration examples of the image encodingdevice according to an embodiment.

[1-1. Image Encoding Device]

FIG. 1 is a block diagram showing an example of a configuration of animage encoding device 10 according to an embodiment. Referring to FIG.1, the image encoding device 10 includes an A/D (Analogue to Digital)conversion section 11, a reordering buffer 12, a subtraction section 13,an orthogonal transformation and quantization section 14, a losslessencoding section 16, an accumulation buffer 17, a rate control section18, an inverse quantization section 21, an inverse orthogonal transformsection 22, an addition section 23, a deblocking filter 24, a framememory 25, a selector 26, an intra prediction section 30, a motionestimation section 40, and a mode selection section 50.

The A/D conversion section 11 converts an image signal input in ananalogue format into image data in a digital format, and outputs aseries of digital image data to the reordering buffer 12.

The reordering buffer 12 sorts the images included in the series ofimage data input from the A/D conversion section 11. After reorderingthe images according to the a GOP (Group of Pictures) structureaccording to the encoding process, the reordering buffer 12 outputs theimage data which has been sorted to the subtraction section 13, theintra prediction section 30, and the motion estimation section 40.

The image data input from the reordering buffer 12 and predicted imagedata selected by the mode selection section 50 described later aresupplied to the subtraction section 13. The subtraction section 13calculates predicted error data which is a difference between the imagedata input from the reordering buffer 12 and the predicted image datainput from the mode selection section 50, and outputs the calculatedpredicted error data to the orthogonal transformation and quantizationsection 14.

The orthogonal transformation and quantization section 14 performsorthogonal transformation and quantization on prediction error datasupplied from the subtraction section 13 and outputs quantized transformcoefficient data (hereinafter referred to as quantized data) to alossless encoding section 16 and an inverse quantization section 21. Abit rate of quantized data output from the orthogonal transformation andquantization section 14 is controlled based on a rate control signalfrom a rate control section 18. A detailed configuration of theorthogonal transformation and quantization section 14 will be describedlater.

The lossless encoding section 16 is supplied with quantized data inputfrom the orthogonal transformation and quantization section 14,information for generating a quantization matrix at the decoding side,and information about intra prediction or inter prediction selected by amode selection section 50. The information about the intra predictionmay contain prediction mode information indicating appropriate intraprediction mode for each block. The information about inter predictionmay contain prediction mode information for prediction of a motionvector for each block, a difference motion vector, and reference imageinformation, for example.

The lossless encoding section 16 performs lossless encoding on quantizeddata to generate an encoded stream. The lossless encoding section 16 mayprovide variable-length encoding or arithmetic encoding as losslessencoding. The lossless encoding section 16 multiplexes information forgenerating a quantization matrix (to be described later) in a header(e.g., a sequence parameter set and a picture parameter set) of anencoded stream. Furthermore, the lossless encoding section 16multiplexes information about the intra prediction or the interprediction in the encoded stream header. The lossless encoding section16 outputs a generated encoded stream to the storage buffer 17.

The accumulation buffer 17 temporarily stores the encoded stream inputfrom the lossless encoding section 16 using a storage medium, such as asemiconductor memory. Then, the accumulation buffer 17 outputs theaccumulated encoded stream at a rate according to the band of atransmission line (or an output line from the image encoding device 10).

The rate control section 18 monitors the free space of the accumulationbuffer 17. Then, the rate control section 18 generates a rate controlsignal according to the free space on the accumulation buffer 17, andoutputs the generated rate control signal to the orthogonaltransformation and quantization section 14. For example, when there isnot much free space on the accumulation buffer 17, the rate controlsection 18 generates a rate control signal for lowering the bit rate ofthe quantized data. Also, for example, when the free space on theaccumulation buffer 17 is sufficiently large, the rate control section18 generates a rate control signal for increasing the bit rate of thequantized data.

The inverse quantization section 21 performs an inverse quantizationprocess on the quantized data input from the orthogonal transformationand quantization section 14. Then, the inverse quantization section 21outputs transform coefficient data acquired by the inverse quantizationprocess to the inverse orthogonal transform section 22.

The inverse orthogonal transform section 22 performs an inverseorthogonal transform process on the transform coefficient data inputfrom the inverse quantization section 21 to thereby restore thepredicted error data. Then, the inverse orthogonal transform section 22outputs the restored predicted error data to the addition section 23.

The addition section 23 adds the restored predicted error data inputfrom the inverse orthogonal transform section 22 and the predicted imagedata input from the mode selection section 50 to thereby generatedecoded image data. Then, the addition section 23 outputs the generateddecoded image data to the deblocking filter 24 and the frame memory 25.

A deblocking filter 24 performs a filtering process to decrease blockdistortion that occurs during image encoding. The deblocking filter 24eliminates the block distortion by filtering decoded image data inputfrom the addition section 23, and then, after the filtering, outputs thedecoded image data to the frame memory 25.

The frame memory 25 stores, using a storage medium, the decoded imagedata input from the addition section 23 and the decoded image data afterfiltering input from the deblocking filter 24.

The selector 26 reads, from the frame memory 25, the decoded image databefore filtering that is to be used for the intra prediction, andsupplies the decoded image data which has been read to the intraprediction section 30 as reference image data. Also, the selector 26reads, from the frame memory 25, the decoded image data after filteringto be used for the inter prediction, and supplies the decoded image datawhich has been read to the motion estimation section 40 as referenceimage data.

The intra prediction section 30 performs an intra prediction process ineach intra prediction mode, based on the image data to be encoded thatis input from the reordering buffer 12 and the decoded image datasupplied via the selector 26. For example, the intra prediction section30 evaluates the prediction result of each intra prediction mode using apredetermined cost function. Then, the intra prediction section 30selects an intra prediction mode by which the cost function value is thesmallest, that is, an intra prediction mode by which the compressionratio is the highest, as the optimal intra prediction mode. Furthermore,the intra prediction section 30 outputs, to the mode selection section50, prediction mode information indicating the optimal intra predictionmode, the predicted image data, and the information about intraprediction such as the cost function value.

A motion estimation section 40 performs an inter prediction process(prediction process between frames) based on image data for encodingsupplied from a reordering buffer 12 and decoded image data supplied viaa selector 26. For example, the motion estimation section 40 evaluatesthe prediction result of each prediction mode using a predetermined costfunction. Then, the motion estimation section 40 selects an optimalprediction mode, namely, a prediction mode that minimizes the costfunction value or maximizes the compression ratio. The motion estimationsection 40 generates predicted image data according to the optimalprediction mode. The motion estimation section 40 outputs informationabout the inter prediction such as information related to the interprediction including prediction mode information indicating the optimalintra prediction mode, the predicted image data, and the cost functionvalue to a mode selection section 50.

The mode selection section 50 compares the cost function value relatedto the intra prediction input from the intra prediction section 30 andthe cost function value related to the inter prediction input from themotion estimation section 40. Then, the mode selection section 50selects a prediction method with a smaller cost function value, from theintra prediction and the inter prediction. In the case of selecting theintra prediction, the mode selection section 50 outputs the informationabout intra prediction to the lossless encoding section 16, and also,outputs the predicted image data to the subtraction section 13 and theaddition section 23. Also, in the case of selecting the interprediction, the mode selection section 50 outputs the information aboutinter prediction described above to the lossless encoding section 16,and also, outputs the predicted image data to the subtraction section 13and the addition section 23.

[1-2. Configuration Example of the Orthogonal Transformation andQuantization Section]

FIG. 2 is a block diagram illustrating a detailed configuration of theorthogonal transformation and quantization section 14 of the imageencoding device 10 illustrated in FIG. 1. With reference to FIG. 2, theorthogonal transformation and quantization section 14 includes aselection section 110, an orthogonal transformation section 120, aquantization section 130, a quantization matrix buffer 140, and a matrixprocessing section 15.

(1) Selection Section

The selection section 110 selects a transform unit (TU) used fororthogonal transformation of image data to be encoded from multipletransform units having different sizes. Size candidates of transformunits to be selected by the selection section 110 include 4×4 and 8×8for H.264/AVC and 4×4, 8×8, 16×16, and 32×32 for HEVC. The selectionsection 110 may select any of transform units according to the size ofan image to be encoded, image quality, or apparatus performance, forexample. A user who develops apparatuses may manually tune selection oftransform units by the selection section 110. The selection section 110outputs information specifying the size of the selected transform unitto the orthogonal transformation section 120, the quantization section130, the lossless encoding section 16, and the inverse quantizationsection 21.

(2) Orthogonal Transformation Section

The orthogonal transformation section 120 orthogonally transforms imagedata (i.e., prediction error data) supplied from the subtraction section13 using the transform unit selected by the selection section 110.Orthogonal transformation performed by the orthogonal transformationsection 120 may represent discrete cosine transform (DCT) orKarhunen-Loeve transform, for example. The orthogonal transformationsection 120 outputs transform coefficient data acquired by an orthogonaltransformation process to the quantization section 130.

(3) Quantization Section

The quantization section 130 quantizes transform coefficient datagenerated by the orthogonal transformation section 120 using aquantization matrix corresponding to the transform unit selected by theselection section 110. The quantization section 130 varies a bit rate ofoutput quantized data by changing quantization steps based on a ratecontrol signal from the rate control section 18.

The quantization section 130 allows the quantization matrix buffer 140to store sets of quantization matrices corresponding to transform unitsselected by the selection section 110. For example, HEVC providestransform unit candidates of four size types such as 4×4, 8×8, 16×16,and 32×32. In such a case, the quantization matrix buffer 140 can storefour types of quantization matrix sets corresponding to the four sizetypes. There may be a case where a specific size uses a defaultquantization matrix as shown in FIG. 19. In such a case, thequantization matrix buffer 140 may store only a flag indicating the useof the default quantization matrix (not using a user-definedquantization matrix) in association with the specific size.

A set of quantization matrices the quantization section 130 may use canbe typically configured for each sequence of encoded streams. If a setof quantization matrices is configured for each sequence, thequantization section 130 may update the set for each picture.Information to control the configuration and the update of sets ofquantization matrices can be inserted into a sequence parameter set anda picture parameter set, for example.

(4) Quantization Matrix Buffer

The quantization matrix buffer 140 uses a storage medium such assemiconductor memory to temporarily store sets of quantization matricescorresponding to transform units selected by the selection section 110.A process performed by the matrix processing section 150 to be describedbelow references a set of quantization matrices stored by thequantization matrix buffer 140.

(5) Matrix Processing Section

The matrix processing section 150 references a set of quantizationmatrices stored in the quantization matrix buffer 140 for each sequenceof encoded streams and each picture and generates information thatgenerates a quantization matrix corresponding to a transform unit of oneor more sizes from another quantization matrix corresponding to atransform unit of one size. A quantization matrix may be generatedtypically based on the minimum of transform unit sizes. If HEVC providestransform unit candidates of four size types such as 4×4, 8×8, 16×16,and 32×32, a 4×4 quantization matrix can be used to generate theinformation that generates quantization matrices of the other sizes. Theinformation generated by the matrix processing section 15 may includebasic matrix information and difference matrix information to bedescribed later. The information generated by the matrix processingsection 150 is output to the lossless encoding section 16 and may beinserted into the encoded stream header.

The specification mainly describes an example of generating aquantization matrix of a larger size from a quantization matrix of theminimum size. While not limited thereto, a quantization matrix having asmaller size and/or a larger size may be generated from a quantizationmatrix having a size other than the minimum.

[1-3. Detailed Configuration Example of the Matrix Processing Section]

FIG. 3 is a block diagram illustrating a more detailed configuration ofthe matrix processing section 150 of the orthogonal transformation andquantization section 14 illustrated in FIG. 2. With reference to FIG. 3,the matrix processing section 150 includes a prediction section 152 anda difference calculation section 154.

(1) Prediction Section

The prediction section 152 acquires a set of quantization matricesstored in the quantization matrix buffer 140 and predicts a secondquantization matrix having a larger size from a first quantizationmatrix contained in the acquired set. For example, 4×4 quantizationmatrix SL1 is defined as follows.

$\begin{matrix}\lbrack {{Math}.\mspace{14mu} 1} \rbrack & \; \\{{{SL}\; 1} = \begin{pmatrix}a_{00} & a_{10} & a_{20} & a_{30} \\a_{01} & a_{11} & a_{21} & a_{31} \\a_{02} & a_{12} & a_{22} & a_{32} \\a_{03} & a_{13} & a_{23} & a_{33}\end{pmatrix}} & (1)\end{matrix}$

For example, 8×8 predicted matrix PSL2 can be predicted by theprediction section 152 from quantization matrix SL1 and calculated asfollows according to prediction expression (2) below.

$\begin{matrix}\lbrack {{Math}.\mspace{14mu} 2} \rbrack & \; \\{{{PSL}\; 2} = \begin{pmatrix}a_{00} & a_{00} & a_{10} & a_{10} & a_{20} & a_{20} & a_{30} & a_{30} \\a_{00} & a_{00} & a_{10} & a_{10} & a_{20} & a_{20} & a_{30} & a_{30} \\a_{01} & a_{01} & a_{11} & a_{11} & a_{21} & a_{21} & a_{31} & a_{31} \\a_{01} & a_{01} & a_{11} & a_{11} & a_{21} & a_{21} & a_{31} & a_{31} \\a_{02} & a_{02} & a_{12} & a_{12} & a_{22} & a_{22} & a_{32} & a_{32} \\a_{02} & a_{02} & a_{12} & a_{12} & a_{22} & a_{22} & a_{32} & a_{32} \\a_{03} & a_{03} & a_{13} & a_{13} & a_{23} & a_{23} & a_{33} & a_{33} \\a_{03} & a_{03} & a_{13} & a_{13} & a_{23} & a_{23} & a_{33} & a_{33}\end{pmatrix}} & (2)\end{matrix}$

With reference to prediction expression (2), duplicating one of twoelements adjacent to each other in quantization matrix SL1 generatespredicted matrix PSL2 as an element between the two elements.

Instead, predicted matrix PSL2 may be calculated from quantizationmatrix SL1 according to prediction expression (3) below.

$\begin{matrix}\lbrack {{Math}.\mspace{14mu} 3} \rbrack & \; \\{{{PSL}\; 2} = \begin{pmatrix}a_{00} & \frac{a_{00} + a_{10} + 1}{2} & a_{10} & \frac{a_{10} + a_{20} + 1}{2} & a_{20} & \frac{a_{20} + a_{30} + 1}{2} & a_{30} & a_{30} \\\frac{a_{00} + a_{01} + 1}{2} & \frac{a_{00} + a_{11} + 1}{2} & \frac{a_{10} + a_{11} + 1}{2} & \frac{a_{10} + a_{21} + 1}{2} & \frac{a_{20} + a_{21} + 1}{2} & \frac{a_{20} + a_{31} + 1}{2} & \frac{a_{30} + a_{31} + 1}{2} & \frac{a_{30} + a_{31} + 1}{2} \\a_{01} & \frac{a_{01} + a_{11} + 1}{2} & a_{11} & \frac{a_{11} + a_{21} + 1}{2} & a_{21} & \frac{a_{21} + a_{31} + 1}{2} & a_{31} & a_{31} \\\frac{a_{01} + a_{02} + 1}{2} & \frac{a_{01} + a_{12} + 1}{2} & \frac{a_{11} + a_{12} + 1}{2} & \frac{a_{11} + a_{22} + 1}{2} & \frac{a_{21} + a_{22} + 1}{2} & \frac{a_{21} + a_{32} + 1}{2} & \frac{a_{31} + a_{32} + 1}{2} & \frac{a_{31} + a_{32} + 1}{2} \\a_{02} & \frac{a_{02} + a_{12} + 1}{2} & a_{12} & \frac{a_{12} + a_{22} + 1}{2} & a_{22} & \frac{a_{22} + a_{32} + 1}{2} & a_{32} & a_{32} \\\frac{a_{02} + a_{03} + 1}{2} & \frac{a_{02} + a_{13} + 1}{2} & \frac{a_{12} + a_{13} + 1}{2} & \frac{a_{12} + a_{23} + 1}{2} & \frac{a_{22} + a_{23} + 1}{2} & \frac{a_{22} + a_{33} + 1}{2} & \frac{a_{32} + a_{33} + 1}{2} & \frac{a_{32} + a_{33} + 1}{2} \\a_{03} & \frac{a_{03} + a_{13} + 1}{2} & a_{13} & \frac{a_{13} + a_{23} + 1}{2} & a_{23} & \frac{a_{23} + a_{33} + 1}{2} & a_{33} & a_{33} \\a_{03} & \frac{a_{03} + a_{13} + 1}{2} & a_{13} & \frac{a_{13} + a_{23} + 1}{2} & a_{23} & \frac{a_{23} + a_{33} + 1}{2} & a_{33} & a_{33}\end{pmatrix}} & (3)\end{matrix}$

With reference to prediction expression (3), linearly interpolating twoelements adjacent to each other in quantization matrix SL1 generatespredicted matrix PSL2 as an element between the two elements. Predictionexpression (3) duplicates the right-end element in predicted matrix PSL2from the adjacent element to the left. Instead of the duplication, thelinear extrapolation may be used to calculate the right-end elements.Similarly, the linear extrapolation may be used to calculate the bottomelement in predicted matrix PSL2 according to prediction expression (3)instead of duplicating the adjacent element just above. For example,prediction expression (3) yields a₃₃ for element PSL2_(8,8) at theeighth row and the eight column in predicted matrix PSL2. The sameelement may be also calculated as follows according to the linearextrapolation.

$\begin{matrix}\lbrack {{Math}.\mspace{14mu} 4} \rbrack & \; \\{{{PSL}\; 2_{8,8}} = {\frac{a_{33} - a_{22} + 1}{2} + a_{33}}} & (4)\end{matrix}$

Prediction expression (2) can generate predicted matrix PSL2 at lesscalculation costs than prediction expression (3). The use of predictionexpression (3) can generate a smooth predicted matrix more approximateto a quantization matrix to be used originally. Therefore, the use ofprediction expression (3) can reduce the amount of encoded informationby approximately zeroing elements of a difference matrix to be describedlater.

Prediction expressions and (2) and (3) are mere examples of availableprediction expressions. Any other prediction expressions may be used.

After generating predicted matrix PSL2 from quantization matrix SL1, theprediction section 152 outputs the generated predicted matrix PSL2 tothe difference calculation section 154. For example, the predictionsection 152 predicts 16×16 predicted matrix PSL3 from 8×8 quantizationmatrix SL2 contained in the set of quantization matrices and outputspredicted matrix PSL3 to the difference calculation section 154.Further, the prediction section 152 predicts 32×32 predicted matrix PSL4from 16×16 quantization matrix SL3 contained in the set of quantizationmatrices and outputs predicted matrix PSL4 to the difference calculationsection 154. A prediction expression which is equal to theabove-described prediction expression (2) or (3) may be used to predictpredicted matrices PSL3 and PSL4. The prediction section 152 outputs thebasic matrix information to the lossless encoding section 16. The basicmatrix information specifies 4×4 quantization matrix SL1 as a base ofgenerating the above-described predicted matrices PSL2, PSL3, and PSL4.

(2) Difference Calculation Section

The difference calculation section 154 calculates difference matricesDSL2, DSL3, and DSL4 according to expressions (5) through (7). Each ofdifference matrices DSL2, DSL3, and DSL4 represents a difference betweeneach of predicted matrices PSL2, PSL3, and PSL4 supplied from theprediction section 152 and each of corresponding quantization matricesSL2, SL3, and SL4.[Math. 5]DSL2=SL2−PSL2  (5)DSL3=SL3−PSL3  (6)DSL4=SL4−PSL4  (7)

The difference calculation section 154 supplies the lossless encodingsection 16 with information representing difference matrices DSL2, DSL3,and DSL4.

If the default quantization matrix is used for a given size, the matrixprocessing section 150 does not perform prediction and differencecalculation on a quantization matrix of that size. Instead, the matrixprocessing section 150 supplies the lossless encoding section 16 withonly a flag indicating the use of the default quantization matrix inassociation with the corresponding size. If there is no differencebetween the predicted matrix and the quantization matrix, the differencecalculation section 154 does not output difference matrix informationbut outputs only a flag indicating no difference to the losslessencoding section 16. If the quantization matrix is not updated at thetiming to change a picture, the matrix processing section 150 can supplythe lossless encoding section 16 with only a flag indicating that thequantization matrix is not updated.

[1-4. Examples of Information to be Encoded]

(1) Sequence Parameter Set

FIG. 4 is an explanatory diagram illustrating information inserted intoa sequence parameter set according to the embodiment. FIG. 4 shows threetypes of information such as “matrix type flag,” “difference flag,” and“matrix information (to be encoded)” as information to be encoded foreach quantization matrix size or transform unit (TU) size.

The matrix type flag specifies whether to use a user-definedquantization matrix or a default quantization matrix for each size. Ifthe matrix type flag is set to 1 for a given size, a user-definedquantization matrix is used for the size. If the matrix type flag is setto 0 for a given size, a default quantization matrix is used for thesize. If the matrix type flag is set to 0, none of the matrixinformation, the difference matrix information, and the difference flagdescribed below is encoded.

The difference flag identifies whether there is a difference between thepredicted matrix and the quantization matrix if the matrix type flag isset to 1 for each size to indicate the user-defined quantization matrix.If the matrix type flag is set to 1 for a given size, there is adifference between the predicted matrix and the quantization matrix forthe size and the difference matrix information is encoded. If the matrixtype flag is set to 0 for a given size, the difference matrixinformation for the size is not encoded. The difference flag is notencoded for the size (e.g., 4×4) as a prediction base regardless of thematrix type flag.

(2) Picture Parameter Set

FIG. 5 is an explanatory diagram illustrating information inserted intoa picture parameter set according to the embodiment. FIG. 5 shows fourtypes of information such as “update flag,” “matrix type flag,”“difference flag,” and “matrix information (to be encoded)” asinformation to be encoded for each quantization matrix size or transformunit (TU) size. The matrix type flag and the difference flag have thesame meanings as the flags with the same names for sequence parametersets described with reference to FIG. 4.

The update flag indicates whether to update the quantization matrix atthe timing of changing a picture for each size. If the update flag isset to 1 for a given size, a quantization matrix of the size is updated.If the update flag is set to 0, a quantization matrix of the size is notupdated and a quantization matrix specified for the previous picture orthe current sequence is used as is. If the update flag is set to 0, noneof the matrix type flag, the difference flag, and the difference matrixinformation (or the matrix information for 4×4) for the size is encoded.

2. Encoding Process Flow According to an Embodiment

FIGS. 6A and 6B are flowcharts illustrating a first example of encodingprocess flow according to the embodiment. The matrix processing section150 and the lossless encoding section 16 can perform the processrepresented by the flowcharts mainly on each encoded stream sequence.

With reference to FIG. 6A, the matrix processing section 150 acquires aset of quantization matrices used for the quantization section 130 inthis sequence from the quantization matrix buffer 140 (step S100). As anexample, the set of quantization matrices is assumed to containquantization matrices corresponding to the sizes of 4×4, 8×8, 16×16, and32×32.

The matrix processing section 150 determines whether a 4×4 quantizationmatrix is a user-defined one (step S102). If the 4×4 quantization matrixis a user-defined one, the lossless encoding section 16 encodes thebasic matrix information that represents a 4×4 quantization matrix withthe matrix type flag set to 1 (step S106). If the 4×4 quantizationmatrix is a default one, the lossless encoding section 16 encodes onlythe matrix type flag set to 0 (step S108).

The matrix processing section 150 determines whether an 8×8 quantizationmatrix is a user-defined one (step S112). If the 8×8 quantization matrixis a user-defined one, the matrix processing section 150 uses theabove-described prediction expression (2) or (3) to calculate an 8×8predicted matrix from the 4×4 quantization matrix (step S114). Thelossless encoding section 16 encodes the matrix type flag (=1), thedifference flag, and the difference matrix information (if any)indicating a difference between the 8×8 quantization matrix and thecalculated predicted matrix (step S116). If the 8×8 quantization matrixis a default one, the lossless encoding section 16 encodes only thematrix type flag set to 0 (step S118).

With reference to FIG. 6B, the matrix processing section 150 determineswhether a 16×16 quantization matrix is a user-defined one (step S122).If the 16×16 quantization matrix is a user-defined one, the matrixprocessing section 150 calculates a 16×16 predicted matrix from the 8×8quantization matrix (step S124). The lossless encoding section 16encodes the matrix type flag (=1), the difference flag, and thedifference matrix information (if any) indicating a difference betweenthe 16×16 quantization matrix and the calculated predicted matrix (stepS126). If the 16×16 quantization matrix is a default one, the losslessencoding section 16 encodes only the matrix type flag set to 0 (stepS128).

The matrix processing section 150 determines whether a 32×32quantization matrix is a user-defined one (step S132). If the 32×32quantization matrix is a user-defined one, the matrix processing section150 calculates a 32×32 predicted matrix from the 16×16 quantizationmatrix (step S134). The lossless encoding section 16 encodes the matrixtype flag (=1), the difference flag, and the difference matrixinformation (if any) indicating a difference between the 32×32quantization matrix and the calculated predicted matrix (step S136). Ifthe 32×32 quantization matrix is a default one, the lossless encodingsection 16 encodes only the matrix type flag set to 0 (step S138).

FIGS. 7A and 7B are flowcharts illustrating a second example of encodingprocess flow according to the embodiment. The matrix processing section150 and the lossless encoding section 16 can perform the processrepresented by the flowcharts mainly on each picture corresponding to anencoded stream sequence.

With reference to FIG. 7A, the matrix processing section 150 acquires aset of quantization matrices used for the quantization section 130 inthe picture from the quantization matrix buffer 140 (step S150).Similarly to the examples in FIGS. 6A and 6B, the set of quantizationmatrices is assumed to contain quantization matrices corresponding tothe sizes of 4×4, 8×8, 16×16, and 32×32.

The matrix processing section 150 determines whether a 4×4 quantizationmatrix is updated in the picture (step S152). If the quantization matrixis not updated, the lossless encoding section 16 encodes only the updateflag set to 0 (step S158). If the quantization matrix is updated, theprocess proceeds to step S154. If the quantization matrix is updated,the matrix processing section 150 determines whether a new 4×4quantization matrix is a user-defined one (step S154). If the 4×4quantization matrix is a user-defined one, the lossless encoding section16 encodes the basic matrix information that represents a 4×4quantization matrix with the update flag set to 1 and the matrix typeflag set to 1 (step S156). If the 4×4 quantization matrix is a defaultone, the lossless encoding section 16 encodes the update flag set to 1and the matrix type flag set to 0 (step S158).

The matrix processing section 150 determines whether an 8×8 quantizationmatrix is updated in the picture (step S160). If the quantization matrixis not updated, the lossless encoding section 16 encodes only the updateflag set to 0 (step S168). If the quantization matrix is updated, theprocess proceeds to step S162. If the quantization matrix is updated,the matrix processing section 150 determines whether an 8×8 quantizationmatrix is a user-defined one (step S162). If the 8×8 quantization matrixis a user-defined one, the matrix processing section 150 calculates an8×8 predicted matrix from the 4×4 quantization matrix for a new pictureregardless of whether the 4×4 quantization matrix is updated (stepS164). The lossless encoding section 16 encodes the update flag (=1),the matrix type flag (=1), the difference flag, and the differencematrix information (if any) indicating a difference between the 8×8quantization matrix and the calculated predicted matrix (step S166). Ifthe 8×8 quantization matrix is a default one, the lossless encodingsection 16 encodes the update flag set to 1 and the matrix type flag setto 0 (step S168).

With reference to FIG. 7B, the matrix processing section 150 determineswhether a 16×16 quantization matrix is updated in the picture (stepS170). If the quantization matrix is not updated, the lossless encodingsection 16 encodes only the update flag set to 0 (step S178). If thequantization matrix is updated, the process proceeds to step S172. Ifthe quantization matrix is updated, the matrix processing section 150determines whether a 16×16 quantization matrix is a user-defined one(step S172). If the 16×16 quantization matrix is a user-defined one, thematrix processing section 150 calculates a 16×16 predicted matrix fromthe 8×8 quantization matrix for a new picture regardless of whether the8×8 quantization matrix is updated (step S174). The lossless encodingsection 16 encodes the update flag (=1), the matrix type flag (=1), thedifference flag, and the difference matrix information (if any)indicating a difference between the 16×16 quantization matrix and thecalculated predicted matrix (step S176). If the 16×16 quantizationmatrix is a default one, the lossless encoding section 16 encodes theupdate flag set to 1 and the matrix type flag set to 0 (step S178).

The matrix processing section 150 determines whether a 32×32quantization matrix is updated in the picture (step S180). If thequantization matrix is not updated, the lossless encoding section 16encodes only the update flag set to 0 (step S188). If the quantizationmatrix is updated, the process proceeds to step S182. If thequantization matrix is updated, the matrix processing section 150determines whether an 32×32 quantization matrix is a user-defined one(step S182). If the 32×32 quantization matrix is a user-defined one, thematrix processing section 150 calculates a 32×32 predicted matrix fromthe 16×16 quantization matrix for a new picture regardless of whetherthe 16×16 quantization matrix is updated (step S184). The losslessencoding section 16 encodes the update flag (=1), the matrix type flag(=1), the difference flag, and the difference matrix information (ifany) indicating a difference between the 32×32 quantization matrix andthe calculated predicted matrix (step S186). If the 32×32 quantizationmatrix is a default one, the lossless encoding section 16 encodes theupdate flag set to 1 and the matrix type flag set to 0 (step S188).

The technique to predict quantization matrices based on one quantizationmatrix can eliminate the need to transmit multiple quantization matricescorresponding to multiple transform unit sizes from the encoding side tothe decoding side. An increase in the code amount can be effectivelysuppressed even if the number of quantization matrices increases.

3. Configuration Examples of the Image Decoding Device According to anEmbodiment

The following describes configuration examples of the image decodingdevice according to an embodiment.

[3-1. Overall Configuration Example]

FIG. 8 is a block diagram showing an example of a configuration of animage decoding device 60 according to an embodiment. With reference toFIG. 8, the image decoding device 60 includes an accumulation buffer 61,a lossless decoding section 62, an inverse quantization and inverseorthogonal transformation section 63, an addition section 65, adeblocking filter 66, a reordering buffer 67, a D/A (Digital toAnalogue) conversion section 68, a frame memory 69, selectors 70 and 71,an intra prediction section 80, and a motion compensation section 90.

The accumulation buffer 61 temporarily stores an encoded stream inputvia a transmission line using a storage medium.

The lossless decoding section 62 decodes an encoded stream supplied fromthe storage buffer 61 according to the encoding system used for theencoding. The lossless decoding section 62 decodes informationmultiplexed in the header area of encoded streams. The informationmultiplexed in the header area of encoded streams may include the basicmatrix information and the difference matrix information to generate theabove-described quantization matrix and information about intraprediction and inter prediction in the block header. The losslessdecoding section 62 supplies the inverse quantization and inverseorthogonal transformation section 63 with information to generatequantized data and a quantization matrix after decoding. The losslessdecoding section 62 supplies the intra prediction section 80 withinformation about the intra prediction. The lossless decoding section 62supplies the motion compensation section 90 with information about theinter prediction.

The inverse quantization and inverse orthogonal transformation section63 performs inverse quantization and inverse orthogonal transformationon quantized data supplied from the lossless decoding section 62 togenerate prediction error data. The inverse quantization and inverseorthogonal transformation section 63 supplies the addition section 65with the generated prediction error data.

The addition section 65 adds the predicted error data input from theinverse quantization and inverse orthogonal transformation section 63and predicted image data input from the selector 71 to thereby generatedecoded image data. Then, the addition section 65 outputs the generateddecoded image data to the deblocking filter 66 and the frame memory 69.

The deblocking filter 66 eliminates the block distortion by filteringdecoded image data input from the addition section 65, and then, afterthe filtering, outputs the decoded image data to the reordering buffer67 and the frame memory 69.

The reordering buffer 67 generates a series of image data in a timesequence by reordering images input from the deblocking filter 66. Then,the reordering buffer 67 outputs the generated image data to the D/Aconversion section 68.

The D/A conversion section 68 converts the image data in a digitalformat input from the reordering buffer 67 into an image signal in ananalogue format. Then, the D/A conversion section 68 causes an image tobe displayed by outputting the analogue image signal to a display (notshown) connected to the image decoding device 60, for example.

The frame memory 69 uses a storage medium to store the decoded imagedata input from the addition section 65 before filtering and the decodedimage data input from the deblocking filter 66 after filtering.

The selector 70 switches the output destination of the image data fromthe frame memory 69 between the intra prediction section 80 and themotion compensation section 90 for each block in the image according tomode information acquired by the lossless decoding section 62. Forexample, in the case the intra prediction mode is specified, theselector 70 outputs the decoded image data before filtering that issupplied from the frame memory 69 to the intra prediction section 80 asreference image data. Also, in the case the inter prediction mode isspecified, the selector 70 outputs the decoded image data afterfiltering that is supplied from the frame memory 69 to the motioncompensation section 90 as the reference image data.

The selector 71 switches the output source of predicted image data to besupplied to the addition section 65 between the intra prediction section80 and the motion compensation section 90 for each block in the imageaccording to the mode information acquired by the lossless decodingsection 62. For example, in the case the intra prediction mode isspecified, the selector 71 supplies to the addition section 65 thepredicted image data output from the intra prediction section 80. In thecase the inter prediction mode is specified, the selector 71 supplies tothe addition section 65 the predicted image data output from the motioncompensation section 90.

The intra prediction section 80 performs in-screen prediction of a pixelvalue based on the information about intra prediction input from thelossless decoding section 62 and the reference image data from the framememory 69, and generates predicted image data. Then, the intraprediction section 80 outputs the generated predicted image data to theselector 71.

The motion compensation section 90 performs a motion compensationprocess based on the information about inter prediction input from thelossless decoding section 62 and the reference image data from the framememory 69, and generates predicted image data. Then, the motioncompensation section 90 outputs the generated predicted image data tothe selector 71.

[3-2. Configuration Example of the Inverse Quantization and InverseOrthogonal Transformation Section]

FIG. 9 is a block diagram illustrating a detailed configuration of theinverse quantization and inverse orthogonal transformation section 63 ofthe image decoding device 60 illustrated in FIG. 8. As shown in FIG. 9,the inverse quantization and inverse orthogonal transformation section63 includes a matrix generation section 210, a selection section 230, aninverse quantization section 240, and an inverse orthogonaltransformation section 250.

(1) Matrix Generation Section

The matrix generation section 210 generates a quantization matrixcorresponding to transform units representing one or more sizes from aquantization matrix corresponding to a transform unit representing onesize for each encoded stream sequence and picture. A quantization matrixmay be generated typically based on the minimum of transform unit sizes.According to the embodiment, the matrix generation section 210 generates8×8, 16×16, and 32×32 quantization matrices from a 4×4 quantizationmatrix as the minimum size using the difference matrix information aboutlarger sizes.

(2) Selection Section

The selection section 230 selects a transform unit (TU) used for inverseorthogonal transformation of image data to be decoded from multipletransform units having different sizes. Size candidates of transformunits to be selected by the selection section 230 include 4×4 and 8×8for H.264/AVC and 4×4, 8×8, 16×16, and 32×32 for HEVC. The selectionsection 230 may select a transform unit based on LCU, SCU, andsplit_flag contained in the encoded stream header, for example. Theselection section 230 outputs information specifying the size of theselected transform unit to the inverse quantization section 240 and theinverse orthogonal transformation section 250.

(3) Inverse Quantization Section

The inverse quantization section 240 uses a quantization matrixcorresponding to the transform unit selected by the selection section230 to inversely quantize transform coefficient data quantized duringimage encoding. Quantization matrices used for the inverse quantizationcontain a matrix generated by the matrix generation section 210. Forexample, the selection section 230 may select an 8×8, 16×16, or 32×32transform unit. In such a case, the selected transform unit maycorrespond to the quantization matrix the matrix generation section 210generates from a 4×4 quantization matrix. The inverse quantizationsection 240 supplies the inverse orthogonal transformation section 250with the inversely quantized transform coefficient data.

(4) Inverse Orthogonal Transformation Section

The inverse orthogonal transformation section 250 generates predictionerror data according to the orthogonal transformation system used forencoding. To do this, the inverse orthogonal transformation section 250uses the selected transform unit to perform inverse orthogonaltransformation on transform coefficient data inversely quantized by theinverse quantization section 240. The inverse orthogonal transformationsection 250 supplies the addition section 65 with the generatedprediction error data.

[3-3. Detailed Configuration Example of the Matrix Generation Section]

FIG. 10 is a block diagram illustrating a more detailed configuration ofthe matrix generation section 210 of the inverse quantization andinverse orthogonal transformation section 63 illustrated in FIG. 9. Withreference to FIG. 10, the matrix generation section 210 includes a basematrix acquisition section 212, a difference acquisition section 214, aprediction section 216, a reconstruction section 218, and a quantizationmatrix buffer 220.

(1) Base Matrix Acquisition Section

The base matrix acquisition section 212 acquires basic matrixinformation supplied from the lossless decoding section 62. As describedabove, the basic matrix information according to the embodimentspecifies 4×4 quantization matrix SL1 as the minimum size. The basematrix acquisition section 212 allows the quantization matrix buffer 220to store 4×4 quantization matrix SL1 specified in the basic matrixinformation. If the matrix type flag set to 0 is acquired for eachsequence or picture, the base matrix acquisition section 212 allows thequantization matrix buffer 220 to store the default 4×4 quantizationmatrix without acquiring the basic matrix information. If the updateflag set to 0 is acquired for each picture, the base matrix acquisitionsection 212 does not update quantization matrix SL1 stored in thequantization matrix buffer 220 during the previous process. The basematrix acquisition section 212 supplies the prediction section 216 with4×4 quantization matrix SL1.

(2) Difference Acquisition Section

The difference acquisition section 214 acquires the difference matrixinformation supplied from the lossless decoding section 62. As describedabove, the difference matrix information according to the embodimentspecifies difference matrices DSL2, DSL3, and DSL4 each of whichrepresents a difference between each of predicted matrices PSL2, PSL3,and PSL4 predicted from 4×4 quantization matrix SL1 and each ofquantization matrices SL2, SL3, and SL4, respectively. The differenceacquisition section 214 supplies the reconstruction section 218 withdifference matrices DSL2, DSL3, and DSL4 specified in the differencematrix information. If the matrix type flag set to 0 is acquired foreach sequence or picture or difference flag set to 0 is acquired, thedifference acquisition section 214 assumes a difference matrix havingthe corresponding size to be null without acquiring the differencematrix information. If the update flag set to 0 is acquired for eachpicture, the difference acquisition section 214 outputs no differencematrix for the corresponding size.

(3) Prediction Section

The prediction section 216 follows the prediction expression used forthe image encoding such as prediction expression (2) or (3) describedabove to calculate 8×8 predicted matrix PSL2 having a larger size fromthe base matrix such as 4×4 quantization matrix SL1 according to theembodiment supplied from the base matrix acquisition section 212. Theprediction section 216 uses the calculated 8×8 predicted matrix PSL2 tocalculate 16×16 predicted matrix PSL3 from quantization matrix SL2reconstructed by the reconstruction section 218. Further, the predictionsection 216 uses the calculated 16×16 predicted matrix PSL3 to calculate32×32 predicted matrix PSL4 from quantization matrix SL3 reconstructedby the reconstruction section 218. The prediction section 216 suppliesthe reconstruction section 218 with predicted matrices PSL2, PSL3, andPSL4. The prediction section 216 generates no predicted matrix for asize having the matrix type flag set to 0 and uses the defaultquantization matrix to calculate predicted matrices having larger sizes.The base matrix acquisition section 212 generates no predicted matrixfor a size having the update flag set to 0 and uses the quantizationmatrix generated from the previous process to calculate predictedmatrices having larger sizes.

(4) Reconstruction Section

The reconstruction section 218 reconstructs quantization matrices SL2,SL3, and SL4 by adding predicted matrices PSL2, PSL3, and PSL4 suppliedfrom the prediction section 216 to difference matrices DSL2, DSL3, andDSL4 supplied from the difference acquisition section 214, respectively.[Math. 6]SL2=PSL2+DSL2  (8)SL3=PSL3+DSL3  (9)SL4=PSL4+DSL4  (10)

The reconstruction section 218 allows the quantization matrix buffer 220to store the reconstructed quantization matrices SL2, SL3, and SL4having sizes 8×8, 16×16, and 32×32. If the matrix type flag set to 0 isacquired for each sequence or picture, the reconstruction section 218allows the quantization matrix buffer 220 to store the defaultquantization matrix as a quantization matrix having the correspondingsize. If the update flag set to 0 is acquired for each picture, the basematrix acquisition section 212 does not update quantization matrix SL2,SL3, or SL4 that has the corresponding size and is stored in thequantization matrix buffer 220 during the previous process.

(5) Quantization Matrix Buffer

The quantization matrix buffer 220 temporarily stores quantizationmatrix SL1 specified by the base matrix acquisition section 212 andquantization matrices SL2, SL3, and SL4 reconstructed by thereconstruction section 218. Quantization matrices SL1, SL2, SL3, and SL4stored in the quantization matrix buffer 220 are used for the inversequantization section 240 to inversely quantize the quantized transformcoefficient data.

The configuration of the inverse quantization and inverse orthogonaltransformation section 63 of the image decoding device 60 describedabove is also applicable to the inverse quantization section 21 and theinverse orthogonal transformation section 22 of the image decodingdevice 10 shown in FIG. 1.

4. Decoding Process Flow According to an Embodiment

FIGS. 11A and 11B are flowcharts illustrating a first example ofdecoding process flow according to the embodiment. The matrix generationsection 210 can perform the process represented by the flowcharts mainlyon each encoded stream sequence.

With reference to FIG. 11A, the matrix generation section 210 checks thematrix type flag contained in the sequence parameter set of the sequenceto determine whether the 4×4 quantization matrix is a user-defined one(step S202). If the 4×4 quantization matrix is a user-defined one, thematrix generation section 210 uses the basic matrix information to setup the 4×4 quantization matrix, namely, store the same in thequantization matrix buffer 220 (step S204). If the 4×4 quantizationmatrix is a default one, the matrix generation section 210 sets up thedefault 4×4 quantization matrix (step S206).

The matrix generation section 210 determines whether an 8×8 quantizationmatrix is a user-defined one (step S212). If the 8×8 quantization matrixis a user-defined one, the matrix generation section 210 uses theabove-described prediction expression (2) or (3) to calculate an 8×8predicted matrix from the 4×4 quantization matrix and adds thecalculated predicted matrix to an 8×8 difference matrix. As a result,the 8×8 quantization matrix is reconstructed (step S214). If the 8×8difference flag is set to 0, the difference matrix is null. The 8×8predicted matrix may be directly set up as a quantization matrix. If the8×8 quantization matrix is a default one, the matrix generation section210 sets up the default 8×8 quantization matrix (step S216).

With reference to FIG. 11B, the matrix generation section 210 determineswhether a 16×16 quantization matrix is a user-defined one (step S222).If the 16×16 quantization matrix is a user-defined one, the matrixgeneration section 210 calculates a 16×16 predicted matrix from the 8×8quantization matrix and adds the calculated predicted matrix to a 16×16difference matrix. As a result, the 16×16 quantization matrix isreconstructed (step S224). If the 16×16 difference flag is set to 0, thedifference matrix is null. The 16×16 predicted matrix is directly set upas a quantization matrix. If the 16×16 quantization matrix is a defaultone, the matrix generation section 210 sets up the default 16×16quantization matrix (step S226).

The matrix generation section 210 determines whether a 32×32quantization matrix is a user-defined one (step S232). If the 32×32quantization matrix is a user-defined one, the matrix generation section210 calculates a 32×32 predicted matrix from the 16×16 quantizationmatrix and adds the calculated predicted matrix to a 32×32 differencematrix. As a result, the 32×32 quantization matrix is reconstructed(step S234). If the 32×32 difference flag is set to 0, the differencematrix is null. The 32×32 predicted matrix is directly set up as aquantization matrix. If the 32×32 quantization matrix is a default one,the matrix generation section 210 sets up the default 32×32 quantizationmatrix (step S236).

FIGS. 12A and 12B are flowcharts illustrating a second example ofdecoding process flow according to the embodiment. The matrix generationsection 210 can perform the process represented by the flowcharts mainlyon each picture for an encoded stream.

With reference to FIG. 12A, the matrix generation section 210 checks theupdate flag contained in a picture parameter set to determine whether a4×4 quantization matrix is updated in the picture (step S250). If a 4×4quantization matrix is not updated, the process skips steps S252 throughS256. If a 4×4 quantization matrix is updated, the matrix generationsection 210 checks the matrix type flag to determine whether the new 4×4quantization matrix is a user-defined one (step S252). If the 4×4quantization matrix is a user-defined one, the matrix generation section210 sets up the 4×4 quantization matrix using the basic matrixinformation (step S254). If the 4×4 quantization matrix is a defaultone, the matrix generation section 210 sets up the default 4×4quantization matrix (step S256).

The matrix generation section 210 checks the update flag to determinewhether an 8×8 quantization matrix is updated in the picture (stepS260). If an 8×8 quantization matrix is not updated, the process skipssteps S262 through S266. If an 8×8 quantization matrix is updated, thematrix generation section 210 checks the matrix type flag to determinewhether the new 8×8 quantization matrix is a user-defined one (stepS262). If the 8×8 quantization matrix is a user-defined one, the matrixgeneration section 210 calculates an 8×8 predicted matrix from the 4×4quantization matrix for a new picture regardless of whether the 4×4quantization matrix is updated. The matrix generation section 210 thenadds the calculated predicted matrix to an 8×8 difference matrix. As aresult, the 8×8 quantization matrix is reconstructed (step S264). If the8×8 difference flag is set to 0, the difference matrix is null. The 8×8predicted matrix may be directly set up as a quantization matrix. If the8×8 quantization matrix is a default one, the matrix generation section210 sets up the default 8×8 quantization matrix (step S266).

With reference to FIG. 12B, the matrix generation section 210 checks theupdate flag to determine whether a 16×16 quantization matrix is updatedin the picture (step S270). If a 16×16 quantization matrix is notupdated, the process skips steps S272 through S276. If a 16×16quantization matrix is updated, the matrix generation section 210 checksthe matrix type flag to determine whether the new 16×16 quantizationmatrix is a user-defined one (step S272). If the 16×16 quantizationmatrix is a user-defined one, the matrix generation section 210calculates a 16×16 predicted matrix from the 8×8 quantization matrix fora new picture regardless of whether the 8×8 quantization matrix isupdated. The matrix generation section 210 then adds the calculatedpredicted matrix to a 16×16 difference matrix. As a result, the 16×16quantization matrix is reconstructed (step S274). If the 16×16difference flag is set to 0, the difference matrix is null. The 16×16predicted matrix is directly set up as a quantization matrix. If the16×16 quantization matrix is a default one, the matrix generationsection 210 sets up the default 16×16 quantization matrix (step S276).

The matrix generation section 210 checks the update flag to determinewhether a 32×32 quantization matrix is updated in the picture (stepS280). If a 32×32 quantization matrix is not updated, the process skipssteps S282 through S286. If a 32×32 quantization matrix is updated, thematrix generation section 210 checks the matrix type flag to determinewhether the new 32×32 quantization matrix is a user-defined one (stepS282). If the 32×32 quantization matrix is a user-defined one, thematrix generation section 210 calculates a 32×32 predicted matrix fromthe 16×16 quantization matrix for a new picture regardless of whetherthe 16×16 quantization matrix is updated. The matrix generation section210 then adds the calculated predicted matrix to a 32×32 differencematrix. As a result, the 32×32 quantization matrix is reconstructed(step S284). If the 32×32 difference flag is set to 0, the differencematrix is null. The 32×32 predicted matrix is directly set up as aquantization matrix. If the 32×32 quantization matrix is a default one,the matrix generation section 210 sets up the default 32×32 quantizationmatrix (step S286).

The decoding side can appropriately reconstruct quantization matricesusing the technique to predict quantization matrices based on onequantization matrix even if the encoding side transmits, to the decodingside, only the difference information about a quantization matrix to bepredicted. An increase in the code amount can be effectively suppressedeven if the number of quantization matrices increases.

The specification has described the example of setting up only one typeof quantization matrix for one transform unit size. While not limitedthereto, multiple types of quantization matrices may be set up for onetransform unit size. In such a case, the sequence parameter set and thepicture parameter set may contain an additional flag indicating which ofmultiple types of quantization matrices needs to be used as a base topredict a quantization matrix of a larger size. It may be preferable toset up multiple types of quantization matrices for one transform unitsize and selectively one quantization matrix to another for each sliceor block within a picture.

5. Modifications

As described above, the technology disclosed in this specification maybe embodied by predicting a quantization matrix of a smaller size from aquantization matrix of a larger size. For example, 8×8 quantizationmatrix SL2 is defined as follows.

$\begin{matrix}\lbrack {{Math}.\mspace{14mu} 7} \rbrack & \; \\{{{SL}\; 2} = \begin{pmatrix}b_{00} & b_{10} & b_{20} & b_{30} & b_{40} & b_{50} & b_{60} & b_{70} \\b_{01} & b_{11} & b_{21} & b_{31} & b_{41} & b_{51} & b_{61} & b_{71} \\b_{02} & b_{12} & b_{22} & b_{32} & b_{42} & b_{52} & b_{62} & b_{72} \\b_{03} & b_{13} & b_{23} & b_{33} & b_{43} & b_{53} & b_{63} & b_{73} \\b_{04} & b_{14} & b_{24} & b_{34} & b_{44} & b_{54} & b_{64} & b_{74} \\b_{05} & b_{15} & b_{25} & b_{35} & b_{45} & b_{55} & b_{65} & b_{75} \\b_{06} & b_{16} & b_{26} & b_{36} & b_{46} & b_{56} & b_{66} & b_{76} \\b_{07} & b_{17} & b_{27} & b_{37} & b_{47} & b_{57} & b_{67} & b_{77}\end{pmatrix}} & (11)\end{matrix}$

For example, the prediction section 152 of the orthogonal transformationand quantization section 14 of the image encoding device 10 calculate4×4 predicted matrix PSL1 from quantization matrix SL2 according toprediction expression (12) as follows.

$\begin{matrix}\lbrack {{Math}.\mspace{14mu} 8} \rbrack & \; \\{{{PSL}\; 1} = \begin{pmatrix}b_{00} & b_{20} & b_{40} & b_{60} \\b_{02} & b_{22} & b_{42} & b_{62} \\b_{04} & b_{24} & b_{44} & b_{64} \\b_{06} & b_{26} & b_{46} & b_{66}\end{pmatrix}} & (12)\end{matrix}$

With reference to prediction expression (12), predicted matrix PSL1 isgenerated by thinning elements of quantization matrix SL2 every otherrow and column. Elements to be thinned may be positioned otherwise thanthe example of prediction expression (12). Increasing the number ofelements to be thinned can cause a quantization matrix to generate apredicted matrix having sides each of which is one quarter or smaller.

Instead, predicted matrix PSL1 may be calculated from quantizationmatrix SL2 according to prediction expression (13) below.

$\begin{matrix}\lbrack {{Math}.\mspace{14mu} 9} \rbrack & \; \\{{{PSL}\; 1} = \begin{pmatrix}\frac{b_{00} + b_{01} + b_{10} + b_{11}}{4} & \frac{b_{20} + b_{21} + b_{30} + b_{31}}{4} & \frac{b_{40} + b_{41} + b_{50} + b_{51}}{4} & \frac{b_{60} + b_{61} + b_{70} + b_{71}}{4} \\\frac{b_{02} + b_{03} + b_{12} + b_{13}}{4} & \frac{b_{22} + b_{23} + b_{32} + b_{33}}{4} & \frac{b_{42} + b_{43} + b_{52} + b_{53}}{4} & \frac{b_{62} + b_{63} + b_{72} + b_{73}}{4} \\\frac{b_{04} + b_{05} + b_{14} + b_{15}}{4} & \frac{b_{24} + b_{25} + b_{34} + b_{35}}{4} & \frac{b_{44} + b_{45} + b_{54} + b_{55}}{4} & \frac{b_{64} + b_{65} + b_{74} + b_{75}}{4} \\\frac{b_{06} + b_{07} + b_{16} + b_{17}}{4} & \frac{b_{26} + b_{27} + b_{36} + b_{37}}{4} & \frac{b_{46} + b_{47} + b_{56} + b_{57}}{4} & \frac{b_{66} + b_{67} + b_{76} + b_{77}}{4}\end{pmatrix}} & (13)\end{matrix}$

With reference to prediction expression (13), predicted matrix PSL1 isgenerated by calculating an average of four elements vertically andhorizontally adjacent to each other in quantization matrix SL2 as oneelement of predicted matrix PSL1. Averaging more elements (e.g., 16elements) vertically and horizontally adjacent to each other can cause aquantization matrix to generate a predicted matrix having sides each ofwhich is one quarter or smaller. Instead of the average used inprediction expression (13), the other representative values such as thecenter value, the minimum value, and the maximum value may be calculatedfrom elements.

A predicted matrix of a smaller size may be calculated from aquantization matrix of a larger size. Also in such a case, thedifference calculation section 154 calculates a difference matrixrepresenting a difference between the predicted matrix supplied from theprediction section 152 and the corresponding quantization matrix andsupplies the lossless encoding section 16 with difference matrixinformation representing the calculated difference matrix. The matrixgeneration section 210 of the inverse quantization and inverseorthogonal transformation section 63 of the image decoding device 60generates a quantization matrix having a smaller size from thequantization matrix specified in the basic matrix information using anyof the above-described prediction expressions and the difference matrixinformation.

FIGS. 13A and 13B are flowcharts illustrating an example of encodingprocess flow according to one modification. The matrix processingsection 150 and the lossless encoding section 16 can perform the processrepresented by the flowcharts mainly on each encoded stream sequence.

With reference to FIG. 13A, the matrix processing section 150 acquires aset of quantization matrices used for the quantization section 130 inthis sequence from the quantization matrix buffer 140 (step S300). As anexample, the set of quantization matrices is assumed to containquantization matrices corresponding to the sizes of 4×4, 8×8, 16×16, and32×32.

The matrix processing section 150 determines whether a 32×32quantization matrix is a user-defined one (step S302). If the 32×32quantization matrix is a user-defined one, the lossless encoding section16 encodes the basic matrix information that represents a 32×32quantization matrix with the matrix type flag set to 1 (step S306). Ifthe 32×32 quantization matrix is a default one, the lossless encodingsection 16 encodes only the matrix type flag set to 0 (step S308).

The matrix processing section 150 determines whether a 16×16quantization matrix is a user-defined one (step S312). If the 16×16quantization matrix is a user-defined one, the matrix processing section150 calculates a 16×16 predicted matrix from the 32×32 quantizationmatrix according to prediction expression (12) or (13) described above(step S314). The lossless encoding section 16 encodes the matrix typeflag (=1), the difference flag, and the difference matrix information(if any) indicating a difference between the 16×16 quantization matrixand the calculated predicted matrix (step S316). If the 16×16quantization matrix is a default one, the lossless encoding section 16encodes only the matrix type flag set to 0 (step S318).

With reference to FIG. 13B, the matrix processing section 150 determineswhether an 8×8 quantization matrix is a user-defined one (step S322). Ifthe 8×8 quantization matrix is a user-defined one, the matrix processingsection 150 calculates an 8×8 predicted matrix from the 16×16quantization matrix (step S324). The lossless encoding section 16encodes the matrix type flag (=1), the difference flag, and thedifference matrix information (if any) indicating a difference betweenthe 8×8 quantization matrix and the calculated predicted matrix (stepS326). If the 8×8 quantization matrix is a default one, the losslessencoding section 16 encodes only the matrix type flag set to 0 (stepS328).

The matrix processing section 150 determines whether a 4×4 quantizationmatrix is a user-defined one (step S332). If the 4×4 quantization matrixis a user-defined one, the matrix processing section 150 calculates a4×4 predicted matrix from the 8×8 quantization matrix (step S334). Thelossless encoding section 16 encodes the matrix type flag (=1), thedifference flag, and the difference matrix information (if any)indicating a difference between the 4×4 quantization matrix and thecalculated predicted matrix (step S336). If the 4×4 quantization matrixis a default one, the lossless encoding section 16 encodes only thematrix type flag set to 0 (step S338).

If the SPS is used to define quantization matrices, the modification maycalculate and encode predicted matrices in descending order ofquantization matrix sizes. If the PPS is used to update quantizationmatrices, the modification may also calculate and encode predictedmatrices in descending order of quantization matrix sizes.

FIGS. 14A and 14B are flowcharts illustrating an example of decodingprocess flow according to the embodiment. The matrix generation section210 can perform the process represented by the flowcharts mainly on eachencoded stream sequence.

With reference to FIG. 14A, the matrix generation section 210 checks thematrix type flag contained in the sequence parameter set of the sequenceto determine whether the 32×32 quantization matrix is a user-defined one(step S402). If the 32×32 quantization matrix is a user-defined one, thematrix generation section 210 uses the basic matrix information to setup the 32×32 quantization matrix, namely, store the same in thequantization matrix buffer 220 (step S404). If the 32×32 quantizationmatrix is a default one, the matrix generation section 210 sets up thedefault 32×32 quantization matrix (step S406).

The matrix generation section 210 determines whether a 16×16quantization matrix is a user-defined one (step S412). If the 16×16quantization matrix is a user-defined one, the matrix generation section210 uses the above-described prediction expression (12) or (13) tocalculate a 16×16 predicted matrix from the 32×32 quantization matrixand adds the calculated predicted matrix to a 16×16 difference matrix.As a result, the 16×16 quantization matrix is reconstructed (step S414).If the 16×16 difference flag is set to 0, the difference matrix is null.The 16×16 predicted matrix is directly set up as a quantization matrix.If the 16×16 quantization matrix is a default one, the matrix generationsection 210 sets up the default 16×16 quantization matrix (step S416).

With reference to FIG. 14B, the matrix generation section 210 determineswhether an 8×8 quantization matrix is a user-defined one (step S422). Ifthe 8×8 quantization matrix is a user-defined one, the matrix generationsection 210 calculates an 8×8 predicted matrix from the 16×16quantization matrix and adds the calculated predicted matrix to an 8×8difference matrix. As a result, the 8×8 quantization matrix isreconstructed (step S424). If the 8×8 difference flag is set to 0, thedifference matrix is null. The 8×8 predicted matrix may be directly setup as a quantization matrix. If the 8×8 quantization matrix is a defaultone, the matrix generation section 210 sets up the default 8×8quantization matrix (step S426).

The matrix generation section 210 determines whether a 4×4 quantizationmatrix is a user-defined one (step S432). If the 4×4 quantization matrixis a user-defined one, the matrix generation section 210 calculates a4×4 predicted matrix from the 8×8 quantization matrix and adds thecalculated predicted matrix to a 4×4 difference matrix. As a result, the4×4 quantization matrix is reconstructed (step S434). If the 4×4difference flag is set to 0, the difference matrix is null. The 4×4predicted matrix may be directly set up as a quantization matrix. If the4×4 quantization matrix is a default one, the matrix generation section210 sets up the default 4×4 quantization matrix (step S436).

If the SPS is used to decode quantization matrices, the modification mayreconstruct quantization matrices in descending order of quantizationmatrix sizes. If the PPS is used to update quantization matrices, themodification may also reconstruct quantization matrices in descendingorder of quantization matrix sizes.

6. Example Applications

The image encoding device 10 and the image decoding device 60 accordingto the embodiment described above may be applied to various electronicappliances such as a transmitter and a receiver for satellitebroadcasting, cable broadcasting such as cable TV, distribution on theInternet, distribution to terminals via cellular communication, and thelike, a recording device that records images in a medium such as anoptical disc, a magnetic disk or a flash memory, a reproduction devicethat reproduces images from such storage medium, and the like. Fourexample applications will be described below.

6-1. First Example Application

FIG. 15 is a block diagram showing an example of a schematicconfiguration of a television adopting the embodiment described above. Atelevision 900 includes an antenna 901, a tuner 902, a demultiplexer903, a decoder 904, an video signal processing section 905, a displaysection 906, an audio signal processing section 907, a speaker 908, anexternal interface 909, a control section 910, a user interface 911, anda bus 912.

The tuner 902 extracts a signal of a desired channel from broadcastsignals received via the antenna 901, and demodulates the extractedsignal. Then, the tuner 902 outputs an encoded bit stream obtained bydemodulation to the demultiplexer 903. That is, the tuner 902 serves astransmission means of the televisions 900 for receiving an encodedstream in which an image is encoded.

The demultiplexer 903 separates a video stream and an audio stream of aprogram to be viewed from the encoded bit stream, and outputs eachstream which has been separated to the decoder 904. Also, thedemultiplexer 903 extracts auxiliary data such as an EPG (ElectronicProgram Guide) from the encoded bit stream, and supplies the extracteddata to the control section 910. Additionally, the demultiplexer 903 mayperform descrambling in the case the encoded bit stream is scrambled.

The decoder 904 decodes the video stream and the audio stream input fromthe demultiplexer 903. Then, the decoder 904 outputs video datagenerated by the decoding process to the video signal processing section905. Also, the decoder 904 outputs the audio data generated by thedecoding process to the audio signal processing section 907.

The video signal processing section 905 reproduces the video data inputfrom the decoder 904, and causes the display section 906 to display thevideo. The video signal processing section 905 may also cause thedisplay section 906 to display an application screen supplied via anetwork. Further, the video signal processing section 905 may perform anadditional process such as noise removal, for example, on the video dataaccording to the setting. Furthermore, the video signal processingsection 905 may generate an image of a GUI (Graphical User Interface)such as a menu, a button, a cursor or the like, for example, andsuperimpose the generated image on an output image.

The display section 906 is driven by a drive signal supplied by thevideo signal processing section 905, and displays a video or an image onan video screen of a display device (for example, a liquid crystaldisplay, a plasma display, an OLED, or the like).

The audio signal processing section 907 performs reproduction processessuch as D/A conversion and amplification on the audio data input fromthe decoder 904, and outputs audio from the speaker 908. Also, the audiosignal processing section 907 may perform an additional process such asnoise removal on the audio data.

The external interface 909 is an interface for connecting the television900 and an external appliance or a network. For example, a video streamor an audio stream received via the external interface 909 may bedecoded by the decoder 904. That is, the external interface 909 alsoserves as transmission means of the televisions 900 for receiving anencoded stream in which an image is encoded.

The control section 910 includes a processor such as a CPU (CentralProcessing Unit), and a memory such as an RAM (Random Access Memory), anROM (Read Only Memory), or the like. The memory stores a program to beexecuted by the CPU, program data, EPG data, data acquired via anetwork, and the like. The program stored in the memory is read andexecuted by the CPU at the time of activation of the television 900, forexample. The CPU controls the operation of the television 900 accordingto an operation signal input from the user interface 911, for example,by executing the program.

The user interface 911 is connected to the control section 910. The userinterface 911 includes a button and a switch used by a user to operatethe television 900, and a receiving section for a remote control signal,for example. The user interface 911 detects an operation of a user viathese structural elements, generates an operation signal, and outputsthe generated operation signal to the control section 910.

The bus 912 interconnects the tuner 902, the demultiplexer 903, thedecoder 904, the video signal processing section 905, the audio signalprocessing section 907, the external interface 909, and the controlsection 910.

In the television 900 configured in this manner, the decoder 904 has afunction of the image decoding device 60 according to the embodimentdescribed above. Accordingly, also in the case of the image decoding inthe television 900, it is possible to suppress in an increase in thecode amount due to an increase in the number of quantization matrices.

6-2. Second Example Application

FIG. 16 is a block diagram showing an example of a schematicconfiguration of a mobile phone adopting the embodiment described above.A mobile phone 920 includes an antenna 921, a communication section 922,an audio codec 923, a speaker 924, a microphone 925, a camera section926, an image processing section 927, a demultiplexing section 928, arecording/reproduction section 929, a display section 930, a controlsection 931, an operation section 932, and a bus 933.

The antenna 921 is connected to the communication section 922. Thespeaker 924 and the microphone 925 are connected to the audio codec 923.The operation section 932 is connected to the control section 931. Thebus 933 interconnects the communication section 922, the audio codec923, the camera section 926, the image processing section 927, thedemultiplexing section 928, the recording/reproduction section 929, thedisplay section 930, and the control section 931.

The mobile phone 920 performs operation such as transmission/receptionof audio signal, transmission/reception of emails or image data, imagecapturing, recording of data, and the like, in various operation modesincluding an audio communication mode, a data communication mode, animage capturing mode, and a videophone mode.

In the audio communication mode, an analogue audio signal generated bythe microphone 925 is supplied to the audio codec 923. The audio codec923 converts the analogue audio signal into audio data, and A/D convertsand compresses the converted audio data. Then, the audio codec 923outputs the compressed audio data to the communication section 922. Thecommunication section 922 encodes and modulates the audio data, andgenerates a transmission signal. Then, the communication section 922transmits the generated transmission signal to a base station (notshown) via the antenna 921. Also, the communication section 922amplifies a wireless signal received via the antenna 921 and convertsthe frequency of the wireless signal, and acquires a received signal.Then, the communication section 922 demodulates and decodes the receivedsignal and generates audio data, and outputs the generated audio data tothe audio codec 923. The audio codec 923 extends and D/A converts theaudio data, and generates an analogue audio signal. Then, the audiocodec 923 supplies the generated audio signal to the speaker 924 andcauses the audio to be output.

Also, in the data communication mode, the control section 931 generatestext data that makes up an email, according to an operation of a uservia the operation section 932, for example. Moreover, the controlsection 931 causes the text to be displayed on the display section 930.Furthermore, the control section 931 generates email data according to atransmission instruction of the user via the operation section 932, andoutputs the generated email data to the communication section 922. Then,the communication section 922 encodes and modulates the email data, andgenerates a transmission signal. Then, the communication section 922transmits the generated transmission signal to a base station (notshown) via the antenna 921. Also, the communication section 922amplifies a wireless signal received via the antenna 921 and convertsthe frequency of the wireless signal, and acquires a received signal.Then, the communication section 922 demodulates and decodes the receivedsignal, restores the email data, and outputs the restored email data tothe control section 931. The control section 931 causes the displaysection 930 to display the contents of the email, and also, causes theemail data to be stored in the storage medium of therecording/reproduction section 929.

The recording/reproduction section 929 includes an arbitrary readableand writable storage medium. For example, the storage medium may be abuilt-in storage medium such as an RAM, a flash memory or the like, oran externally mounted storage medium such as a hard disk, a magneticdisk, a magneto-optical disk, an optical disc, an USB memory, a memorycard, or the like.

Furthermore, in the image capturing mode, the camera section 926captures an image of a subject, generates image data, and outputs thegenerated image data to the image processing section 927, for example.The image processing section 927 encodes the image data input from thecamera section 926, and causes the encoded stream to be stored in thestorage medium of the recording/reproduction section 929.

Furthermore, in the videophone mode, the demultiplexing section 928multiplexes a video stream encoded by the image processing section 927and an audio stream input from the audio codec 923, and outputs themultiplexed stream to the communication section 922, for example. Thecommunication section 922 encodes and modulates the stream, andgenerates a transmission signal. Then, the communication section 922transmits the generated transmission signal to a base station (notshown) via the antenna 921. Also, the communication section 922amplifies a wireless signal received via the antenna 921 and convertsthe frequency of the wireless signal, and acquires a received signal.These transmission signal and received signal may include an encoded bitstream. Then, the communication section 922 demodulates and decodes thereceived signal, restores the stream, and outputs the restored stream tothe demultiplexing section 928. The demultiplexing section 928 separatesa video stream and an audio stream from the input stream, and outputsthe video stream to the image processing section 927 and the audiostream to the audio codec 923. The image processing section 927 decodesthe video stream, and generates video data. The video data is suppliedto the display section 930, and a series of images is displayed by thedisplay section 930. The audio codec 923 extends and D/A converts theaudio stream, and generates an analogue audio signal. Then, the audiocodec 923 supplies the generated audio signal to the speaker 924 andcauses the audio to be output.

In the mobile phone 920 configured in this manner, the image processingsection 927 has a function of the image encoding device 10 and the imagedecoding device 60 according to the embodiment described above.Accordingly, also in the case of the image decoding and encoding in themobile phone 920, it is possible to suppress in an increase in the codeamount due to an increase in the number of quantization matrices.

6-3. Third Example Application

FIG. 17 is a block diagram showing an example of a schematicconfiguration of a recording/reproduction device adopting the embodimentdescribed above. A recording/reproduction device 940 encodes, andrecords in a recording medium, audio data and video data of a receivedbroadcast program, for example. The recording/reproduction device 940may also encode, and record in the recording medium, audio data andvideo data acquired from another device, for example. Furthermore, therecording/reproduction device 940 reproduces, using a monitor or aspeaker, data recorded in the recording medium, according to aninstruction of a user, for example. At this time, therecording/reproduction device 940 decodes the audio data and the videodata.

The recording/reproduction device 940 includes a tuner 941, an externalinterface 942, an encoder 943, an HDD (Hard Disk Drive) 944, a discdrive 945, a selector 946, a decoder 947, an OSD (On-Screen Display)948, a control section 949, and a user interface 950.

The tuner 941 extracts a signal of a desired channel from broadcastsignals received via an antenna (not shown), and demodulates theextracted signal. Then, the tuner 941 outputs an encoded bit streamobtained by demodulation to the selector 946. That is, the tuner 941serves as transmission means of the recording/reproduction device 940.

The external interface 942 is an interface for connecting therecording/reproduction device 940 and an external appliance or anetwork. For example, the external interface 942 may be an IEEE 1394interface, a network interface, an USB interface, a flash memoryinterface, or the like. For example, video data and audio data receivedby the external interface 942 are input to the encoder 943. That is, theexternal interface 942 serves as transmission means of therecording/reproduction device 940.

In the case the video data and the audio data input from the externalinterface 942 are not encoded, the encoder 943 encodes the video dataand the audio data. Then, the encoder 943 outputs the encoded bit streamto the selector 946.

The HDD 944 records in an internal hard disk an encoded bit stream,which is compressed content data of a video or audio, various programs,and other pieces of data. Also, the HDD 944 reads these pieces of datafrom the hard disk at the time of reproducing a video or audio.

The disc drive 945 records or reads data in a recording medium that ismounted. A recording medium that is mounted on the disc drive 945 may bea DVD disc (a DVD-Video, a DVD-RAM, a DVD-R, a DVD-RW, a DVD+, a DVD+RW,or the like), a Blu-ray (registered trademark) disc, or the like, forexample.

The selector 946 selects, at the time of recording a video or audio, anencoded bit stream input from the tuner 941 or the encoder 943, andoutputs the selected encoded bit stream to the HDD 944 or the disc drive945. Also, the selector 946 outputs, at the time of reproducing a videoor audio, an encoded bit stream input from the HDD 944 or the disc drive945 to the decoder 947.

The decoder 947 decodes the encoded bit stream, and generates video dataand audio data. Then, the decoder 947 outputs the generated video datato the OSD 948. Also, the decoder 904 outputs the generated audio datato an external speaker.

The OSD 948 reproduces the video data input from the decoder 947, anddisplays a video. Also, the OSD 948 may superimpose an image of a GUI,such as a menu, a button, a cursor or the like, for example, on adisplayed video.

The control section 949 includes a processor such as a CPU, and a memorysuch as an RAM or an ROM. The memory stores a program to be executed bythe CPU, program data, and the like. A program stored in the memory isread and executed by the CPU at the time of activation of therecording/reproduction device 940, for example. The CPU controls theoperation of the recording/reproduction device 940 according to anoperation signal input from the user interface 950, for example, byexecuting the program.

The user interface 950 is connected to the control section 949. The userinterface 950 includes a button and a switch used by a user to operatethe recording/reproduction device 940, and a receiving section for aremote control signal, for example. The user interface 950 detects anoperation of a user via these structural elements, generates anoperation signal, and outputs the generated operation signal to thecontrol section 949.

In the recording/reproduction device 940 configured in this manner, theencoder 943 has a function of the image encoding device 10 according tothe embodiment described above. Also, the decoder 947 has a function ofthe image decoding device 60 according to the embodiment describedabove. Accordingly, also in the case of the image decoding and encodingin the recording/reproduction device 940, it is possible to suppress inan increase in the code amount due to an increase in the number ofquantization matrices.

6-4. Fourth Example Application

FIG. 18 is a block diagram showing an example of a schematicconfiguration of an image capturing device adopting the embodimentdescribed above. An image capturing device 960 captures an image of asubject, generates an image, encodes the image data, and records theimage data in a recording medium.

The image capturing device 960 includes an optical block 961, an imagecapturing section 962, a signal processing section 963, an imageprocessing section 964, a display section 965, an external interface966, a memory 967, a media drive 968, an OSD 969, a control section 970,a user interface 971, and a bus 972.

The optical block 961 is connected to the image capturing section 962.The image capturing section 962 is connected to the signal processingsection 963. The display section 965 is connected to the imageprocessing section 964. The user interface 971 is connected to thecontrol section 970. The bus 972 interconnects the image processingsection 964, the external interface 966, the memory 967, the media drive968, the OSD 969, and the control section 970.

The optical block 961 includes a focus lens, an aperture stop mechanism,and the like. The optical block 961 forms an optical image of a subjecton an image capturing surface of the image capturing section 962. Theimage capturing section 962 includes an image sensor such as a CCD, aCMOS or the like, and converts by photoelectric conversion the opticalimage formed on the image capturing surface into an image signal whichis an electrical signal. Then, the image capturing section 962 outputsthe image signal to the signal processing section 963.

The signal processing section 963 performs various camera signalprocesses, such as knee correction, gamma correction, color correctionand the like, on the image signal input from the image capturing section962. The signal processing section 963 outputs the image data after thecamera signal process to the image processing section 964.

The image processing section 964 encodes the image data input from thesignal processing section 963, and generates encoded data. Then, theimage processing section 964 outputs the generated encoded data to theexternal interface 966 or the media drive 968. Also, the imageprocessing section 964 decodes encoded data input from the externalinterface 966 or the media drive 968, and generates image data. Then,the image processing section 964 outputs the generated image data to thedisplay section 965. Also, the image processing section 964 may outputthe image data input from the signal processing section 963 to thedisplay section 965, and cause the image to be displayed. Furthermore,the image processing section 964 may superimpose data for displayacquired from the OSD 969 on an image to be output to the displaysection 965.

The OSD 969 generates an image of a GUI, such as a menu, a button, acursor or the like, for example, and outputs the generated image to theimage processing section 964.

The external interface 966 is configured as an USB input/outputterminal, for example. The external interface 966 connects the imagecapturing device 960 and a printer at the time of printing an image, forexample. Also, a drive is connected to the external interface 966 asnecessary. A removable medium, such as a magnetic disk, an optical discor the like, for example, is mounted on the drive, and a program readfrom the removable medium may be installed in the image capturing device960. Furthermore, the external interface 966 may be configured as anetwork interface to be connected to a network such as a LAN, theInternet or the like. That is, the external interface 966 serves astransmission means of the image capturing device 960.

A recording medium to be mounted on the media drive 968 may be anarbitrary readable and writable removable medium, such as a magneticdisk, a magneto-optical disk, an optical disc, a semiconductor memory orthe like, for example. Also, a recording medium may be fixedly mountedon the media drive 968, configuring a non-transportable storage sectionsuch as a built-in hard disk drive or an SSD (Solid State Drive), forexample.

The control section 970 includes a processor such as a CPU, and a memorysuch as an RAM or an ROM. The memory stores a program to be executed bythe CPU, program data, and the like. A program stored in the memory isread and executed by the CPU at the time of activation of the imagecapturing device 960, for example. The CPU controls the operation of theimage capturing device 960 according to an operation signal input fromthe user interface 971, for example, by executing the program.

The user interface 971 is connected to the control section 970. The userinterface 971 includes a button, a switch and the like used by a user tooperate the image capturing device 960, for example. The user interface971 detects an operation of a user via these structural elements,generates an operation signal, and outputs the generated operationsignal to the control section 970.

In the image capturing device 960 configured in this manner, the imageprocessing section 964 has a function of the image encoding device 10and the image decoding device 60 according to the embodiment describedabove. Accordingly, in the case of the image decoding and encoding inthe image capturing device 960, it is possible to suppress in anincrease in the code amount due to an increase in the number ofquantization matrices.

7. Summing-up

There have been described the image encoding device 10 and the imagedecoding device 60 according to an embodiment with reference to FIGS. 1through 18. The embodiment uses the prediction technique to generate asecond quantization matrix corresponding to a transform unitrepresenting a second size from a first quantization matrixcorresponding to a transform unit representing a first size if multiplequantization matrices correspond to multiple transform unitsrepresenting different sizes. This can eliminate the need to encode thewhole of the second quantization matrix. An increase in the code amountcan be effectively suppressed even if the number of quantizationmatrices increases.

The embodiment generates the second quantization matrix using the matrixinformation specifying the first quantization matrix and the differenceinformation (difference matrix information) representing a differencebetween a predicted matrix and the second quantization matrix.Therefore, it is possible to acquire the second quantization matrixappropriate to the image decoding side simply by encoding only adifference between the second quantization matrix and a predictedmatrix.

According to the embodiment, a first flag may indicate the absence of adifference between a predicted matrix and the second quantization matrixand may be acquired from the sequence parameter set or the pictureparameter set. In such a case, a predicted matrix predicted from thesecond quantization matrix is assumed to be the second quantizationmatrix. In this case, the code amount can be further reduced becauseeven difference information is not encoded for the second quantizationmatrix.

The first quantization matrix may have the minimum of transform unitsizes. The above-described configuration need not encode all thequantization matrices other than the quantization matrix having theminimum size. Therefore, an increase in the code amount can be moreeffectively suppressed even if the number of quantization matricesincreases.

In this specification, it has been described how information forgenerating a quantization matrix is multiplexed in a header of anencoded stream and is transmitted from the encoding side to the decodingside. However, a technique of transmitting information used fortransmitting such information is not limited to the technique describedabove. For example, the information may not be multiplexed into anencoded bit stream but may be transmitted or recorded as separate dataassociated with the encoded bit stream. The term “association” signifiesensuring possibility of linking an image (or part of an image such as aslice or a block) contained in the bit stream with informationcorresponding to the image. Namely, the information may be transmittedover a transmission path different from that used for images (or bitstreams). The information may be recorded on a recording medium (or adifferent recording area on the same recording medium) different fromthat used for images (or bit streams). The information and the image (orbit stream) may be associated with each other based on any units such asmultiple frames, one frame, or part of a frame.

The preferred embodiments of the present invention have been describedabove with reference to the accompanying drawings, whilst the presentinvention is not limited to the above examples, of course. A personskilled in the art may find various alternations and modificationswithin the scope of the appended claims, and it should be understoodthat they will naturally come under the technical scope of the presentinvention.

REFERENCE SIGNS LIST

-   10 Image processing device (image encoding device)-   16 Encoding section-   110 Selection section-   120 Orthogonal transformation section-   130 Quantization section-   60 Image processing device (image decoding device)-   210 Matrix generation section-   230 Selection section-   240 Inverse quantization section-   250 Inverse orthogonal transformation section

The invention claimed is:
 1. An image processing device comprising:circuitry configured to: generate, from an 8×8 quantization matrix, a32×32 quantization matrix corresponding to a 32×32 transform unit; andinversely quantize quantized transform coefficient data for image datausing the 32×32 quantization matrix generated by the generation sectionwhen the 32×32 transform unit is used for inverse orthogonaltransformation, wherein the circuitry is configured to generate the32×32 quantization matrix by duplicating one of a first element and asecond element adjacent to each other in the 8×8 quantization matrix asan element between the first element and the second element in the 32×32quantization matrix.
 2. The image processing device according to claim1, wherein the circuitry is configured to decode encoded data of theimage data to generate the quantized transform coefficient data.
 3. Theimage processing device according to claim 2, wherein the circuitry isconfigured to: decode the encoded data per a coding unit, and inverselyquantize the quantized transform coefficient data per a transform unitformed by recursively splitting the coding unit into smaller codingunits.
 4. The image processing device according to claim 3, wherein thecircuitry is configured to reproduce the video data.
 5. The imageprocessing device according to claim 4, wherein the circuitry isconfigured to separate a video stream and audio stream of an inputstream.
 6. The image processing device according to claim 5, wherein thecircuitry is configured to operate the image processing device.
 7. Theimage processing device according to claim 6, wherein the circuitry isconfigured to extract a signal from broadcast signals and demodulate thesignal.
 8. An image processing method comprising: generating, bycircuitry of an image processing device and from an 8×8 quantizationmatrix, a 32×32 quantization matrix corresponding to a 32×32 transformunit; and inversely quantizing, by the circuitry, quantized transformcoefficient data for image data using the 32×32 quantization matrixgenerated from the 8×8 quantization matrix when the 32×32 transform unitis used to perform inverse orthogonal transformation, wherein the 32×32quantization matrix is generated by duplicating one of a first elementand a second element adjacent to each other in the 8×8 quantizationmatrix as an element between the first element and the second element inthe 32×32 quantization matrix.
 9. The image processing method accordingto claim 8, further comprising: decoding encoded data of the image datato generate the quantized transform coefficient data.
 10. The imageprocessing method according to claim 9, wherein the encoded data isdecoded per a coding unit, and the quantized transform coefficient datais inversely quantized per a transform unit formed by recursivelysplitting the coding unit into smaller coding units.